package com.haiya.factory.absfactory.pizza.store;

import com.haiya.factory.absfactory.pizza.product.*;

public class LdFactory implements AbstractFactory {
    @Override
    public Pizza makePizza(String orderType) {
        System.out.println("使用抽象工厂");
        Pizza pizza = null;

        if (orderType.equals("cheese")) {
            pizza = new LdCheesePizza();
        } else if (orderType.equals("greek")) {
            pizza = new LdGreekPizz();
        }
        return pizza;
    }
}
